﻿@model Vasilek.Web.Models.ProductDtoBase


<form asp-action="ProductCreate">
    <br />
    <div class="container border p-3">
        <h1 class="text-primary">Создать продукт</h1>

        <hr />
        <div class="row">

            <div asp-validation-summary="ModelOnly" class="text-danger"></div>


            <div class="col-2">
                <label asp-for="Name" class="control-label pt-2" style="font-size:20px;"></label>
            </div>
            <div class="col-10 pb-3">
                <input asp-for="Name" class="form-control" />
                <span asp-validation-for="Name" class="text-danger"></span>
            </div>


            <div class="col-2">
                <label asp-for="Category.CategoryName" class="control-label pt-2" style="font-size:20px;"></label>
            </div>
            <div class="col-10 pb-3">
                <input asp-for="Category.CategoryName" class="form-control" />
                <span asp-validation-for="Category.CategoryName" class="text-danger"></span>
            </div>


            <div class="col-2">
                <label asp-for="Description" class="control-label pt-2" style="font-size:20px;"></label>
            </div>
            <div class="col-10 pb-3">
                <textarea asp-for="Description" class="form-control" rows="5"></textarea>
                <span asp-validation-for="Description" class="text-danger"></span>
            </div>


            <div class="col-2">
                <label asp-for="ImageUrl" class="control-label pt-2" style="font-size:20px;"></label>
            </div>
            <div class="col-10 pb-3">
                <input asp-for="ImageUrl" class="form-control" />
                <span asp-validation-for="ImageUrl" class="text-danger"></span>
            </div>


            <div class="col-2">
                <label asp-for="Price" class="control-label pt-2" style="font-size:20px;"></label>
            </div>
            <div class="col-10 pb-3">
                <input asp-for="Price" class="form-control" />
                <span asp-validation-for="Price" class="text-danger"></span>
            </div>


            <div class="col-5 offset-2">
                <a asp-action="ProductIndex" class="btn btn-outline-primary form-control">Вернуться</a>
            </div>
            <div class="col-5">
                <input type="submit" value="Добавить" class="btn btn-outline-primary form-control" />
            </div>

        </div>

        <div>
        </div>
    </div>
</form>

@section Scripts {
    <partial name="_ValidationScriptsPartial"/>
}